home *** CD-ROM | disk | FTP | other *** search
-
- SPFIND, a quick find, Copyright 1987 by Stan Peters
- 4276-C Wilkie Way, Palo Alto 94306
-
- OVERVIEW.
-
- This program works much like other FIND or GREP programs that
- you may have used. Enter the program name at the DOS prompt,
- followed by a string you want to find, and then the file
- specification.
-
- Only with this program, you can enter several strings before the
- file name. It will search for all of them on the same pass
- over the file.
-
- You can also specify that you want to see lines surrounding the
- match.
-
- Maybe you want a match only if all the search strings are on the
- line. SPFIND will do that.
-
- Maybe you want a match only if all of a set of words are within
- a few lines of each other. SPFIND will do that.
-
- Maybe you want to know which of a set of documents contain all
- the words you specify. The program will do that.
-
- Optionally, the program will add line numbers to the output
- which can be in "FIND" format or "GREP" format.
-
- Some search programs allow the use of the DOS wildcard
- characters * and ?. Here, the . stands for the ? (any
- character). The * can be done using an 'and' search, e.g.:
- '-a first second' approximates 'first*second'.
-
- The program works best on ASCII files, but will work on many text
- type files. Word processor documents, and probably some
- database files.
-
- The search is quick. Not as fast as Chris Dunfords FGREP,
- but three or more times faster than the GREP's I have seen.
- Entering several strings slows SPFIND very little.
-
-
- Whats New with SPFND4:
-
-
- | Bug fixed: SPFND3 had a life span of about 8 hours, there was
- | a bug, the T option wasn't working.
- |
- | Bug fixed: When -d (document) is on, search switches were not
- | reset with next file, resulting in false matches.
- |
- | -t option added, displays results on screen even when output is
- | is also redirected.
- |
- | -- More --, a pause added at page breaks.
- |
- | The or symbol for compound searches is now / , not | , reducing
- | the need for double quotes.
- |
-
- Files in the distribuition:
-
- SPF.EXE The program
- SPFIND.DOC Program documentation.
- SPF.DAT A small data file used to illustrate
- usage of the program.
-
-
- Using the Program;
-
-
- Usage: spf [-options] string [string].... filename
- Filename may contain ? and *, it may have a path prefix
- You may have 1 to 15 strings.
- A period in the string(s) matches any character.
-
- Entering SPF on the command line, without any parameters will
- give a summary of the options.
-
- Options must start with a '-'. Options may be combined in a
- single term or input individually:
- spf -w -a -15b
- is identical to:
- spf -wa15b.
- These options are available:
-
- a - 'and', all must be present.
- All the strings on the command line must be present.
- See below for a discussion of compound searches - you can
- use the / symbol to get and/or combinations.
-
- b - also search binary files.
- Binary files are normally skipped in the search. You
- usually don't want to search executeable and .ARC files.
- Internally, SPFIND considers a file with 20 characters in
- the first 512 bytes that are less than a hex 9 to identify a
- file as 'binary'. SPFIND works (slowly) on these files.
-
- c - case sensitive search.
- The default is to ignore case (upper/lower) for letters.
- Use this option to restrict your output.
-
- d - Span entire document, if necessary.
- This option is particularly useful if you want to scan many
- documents for the presence of a set of words. When the
- search criteria has been met, the last occurance of each
- string will be output and SPFIND will skip to the next
- file.
-
- f - stop after first find.
- If you just want to know whether the strings are present in
- the file(s), use this option. SPFIND will show the last line
- in the file that satisfys the search criteria for each
- string on the command line.
-
- h - strip hi (8) bits.
- Enter this option if you want the hi bit stripped before
- comparison and output. Use this option if you
- are scanning word processor documents (Wordstar, and perhaps
- others).
-
- l - show line numbers.
- Use this to show line numbers on each output line. For a "normal"
- ASCII file this should agree with the lines in your document.
- SPFIND advances this count when it detects a CRLF, CR alone,
- or LF alone. Or when 100 characters have passed without any of the
- above.
-
- t - send output to both the screen and a redirected ( > ) file.
- You can capture the results to a file AND see the action on
- the screen.
-
- u - Unix (grep) style output.
- Unix 'grep' style lines will be outputted if you use this
- option. Each output line will be prefixed with the name of
- the file containing the string. The messages for file being
- searched, ie "+- filename>" will not appear. Nor
- will the "hex file skipped" message appear.
-
- w - match only if a word.
- A string will be considered a match only if the preceding
- and following positions does not contain an alpha or numeric
- character. For scanning programs, this can be useful to
- restrict output, eg "-w eof" will not output "sizeof".
-
- a number (from 2 thru 15)
- If you enter a number SPFIND will to two things:
- It will search for a match within a span of lines, that
- is, all arguments need not occur on the same line.
- When it finds a match, SPFIND will show it centered in the
- number of lines you have specified. The set of lines
- will be follow by this line: "+-+.
- See below for examples.
-
- A SUMMARY of these options will be displayed on the screen if
- you enter SPF with no parameters.
-
- I have never seen a program that uses a span of lines like this
- and, in testing it, I have found the output rather odd at
- times. But the program was operating correctly. So I have
- included a small file of data (SPF.DAT) so that you can "play"
- with multi-line "and" conditions and get a feel for how it
- works on a simple set of data. The file contains 20 lines:
-
- SPFIND demo data
- w1
- w2
- .
- .
- w18
- w19
-
- I suggest you try these:
-
- Enter: Comment:
- spf w1 spf.dat - 10 lines output
- spf -w w1 spf.dat - 1 line output
- spf -w2 w1 spf.dat - 2 lines output, one after
- spf -w3 w1 spf.dat - 3 lines output, before
- and after
- spf -a2 w1 w2 spf.dat - 2 lines output
- spf -a5 w4 w6 spf.dat - 5 lines output
-
- If you want a compound search using a mixed and/or criteria,
- use the / symbol (see examples below). Enter the -a for an
- "and" search followed by strings that must be there. Then the
- or conditions, with the terms separated by the /.
-
- Search for w4 and either w5 or w6:
-
- spf -a5 w4 w5/w6 spf.dat - 5 lines output
-
- Another example. Search for w7 and either w1 or w5:
-
- spf -a5 w7 w1/w5 spf.dat - 8 lines output
-
- This time we have two sets that match: the first is for w5 and
- w7, the second is for w7 and w1(1). Notice that there are only
- three lines printed in the second set. That is because two of
- its lines have been printed in the set above.
-
- If you want to search for the /, enter the / twice, the double
- slash (//) indicates to SPFIND that this is not an "or". So if
- you want to search for the date 10/12/85, enter 10//12//85.
- Search for /// ? Enter each twice - //////.
-
- Earlier versions of SPFIND used double quotes and the vertical
- bar. But I find my typing errors go up when I enter upper case,
- especially for non-alpha keys. There are a few instances where
- you will have to use double quotes to define the strings, one
- being for blanks within the strings. The other is for those
- keys that DOS captures: <, >, and | .
- Enter "age < 40", not: age < 40 .
-
-
- Other examples:
-
- spf -u w1 spf.dat - 10 lines output, Unix style
- spf -ad w2 w7 w13 spf.dat - 3 lines output, and quit
- searching
- spf w1 spf.* - DOS wildcards OK in file
- name. Binary files
- skipped unless you
- specify -b
-
- If you are a user of DISK NAVIGATOR (another of my shareware
- products) you may be interested in these macros to speed your
- work:
-
- phon spf -a4f address.fil
- Key in 'phon', press ENTER, key in first and last name,
- and press F4.
-
- doc spf -wad ^DP\*.*
- Key in 'doc', press ENTER, key in a set of words, and press
- F4. All documents in the indicated directory that contain
- the set of words will be shown.
-
- The above concepts can also be implemented with .BAT files.
-
- Disk Navigator is on Compuserve, PC-Sig and many other places as
- DNAV13.ARC.
-
-
- WARRANTY.
-
- SPFIND IS DISTRIBUITED ON AN "AS IS" BASIS WITHOUT WARRANTY,
- EXPRESS OR IMPLIED. THE USER IS ADVISED TO TEST THE PACKAGE BEFORE
- RELYING ON IT. THE USER MUST ASSUME FULL RISK AS TO THE RESULTS
- AND PERFORMANCE OF USING THE PACKAGE. ANY LIABILITY OF THE AUTHOR
- WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT. IN NO EVENT
- SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES ARISING FROM THE USE OR
- INABILITY TO USE THIS PACKAGE.
-
- LICENSE.
-
- SPFIND is a copyrighted software that is being distributed as
- shareware. It is NOT in the public domain. By using or
- distributing this package, you agree to the conditions presented
- here.
-
- You may use the SPFIND for your own personal use. If you find it
- useful, you are requested to pay a Registration fee of $10. You
- may use the program on multiple machines. Where there is the
- potential for use on multiple machines at the same time, pay for
- additional copies. If you are using SPFIND in a commercial,
- professional, educational, or governmental organization, you are
- granted a limited license, valid for thirty days, to use this
- package for evaluation purposes; if you continue to use this
- package, you must pay the registration fee. Operators of bulletin
- board systems that offer public domain programs are exempted from
- payment.
-
-
- HOW TO PAY.
-
- The price has been made attractive to encourage users of the
- program to send payment. For each copy in use send:
-
- 5 or more 20 or more
-
- All users: $10 $6 $4
-
- Registered users will be notified by letter of updates to the
- program. Add $6 if you wish to receive a disk with the latest
- version. Please indicate the version you are using so I can send a
- refund if you are current.
-
- The idea of shareware with its low cost distribution of quality
- programs is an American Treasure. Individuals with good ideas can
- afford to implement them. The authors are talented people that may
- forego salary to implement their ideas. They are making a bet that
- their efforts will be accepted and that users will respond. A
- survey has indicated that a very low percentage of users supply
- support.
-
- This is no way to keep the concept alive!
-
- If SPFIND does not fit your needs, please stop and think about what
- shareware packages you do find useful. Support those that you use
- regularly.
-
- Send remittance to:
- Stan Peters
- 4276-C Wilke Way
- Palo Alto, Ca. 94306
-
- I will check regularly for messages to me on SPFIND or DISK NAVIGATOR on:
- Compuserve, my id: 76525,1601
- San Francisco area BBS's (Stan Peters);
- PDSE San Mateo: 415 571 6911
- PDSE Sunnyvale: 408 735 7190
-
-
- DISTRIBUTION.
-
- You may freely copy this program for friends so long as the three
- files are included unmodified. Non-profit user groups and bulletin
- boards may also include it in their libraries.
-
- For-profit organizations may distribute it provided there is a
- PROMINENT statement urging users to support the user supported
- concept. This should be in a brief index type (READ.ME?) file that
- the user accesses to discover the contents of the disk. If in
- doubt, write me, showing me how you get the point across to the
- purchaser. In no case may the cost per disk exceed $6.50.
-
-
-
-
-
- REGISTRATION AND ORDER FORM
-
- Stan Peters
- 4276-C Wilkie Way
- Palo Alto, Ca. 94306
- ---------------------------------------------------------------
- PRICE PRICE
- PRODUCT QTY EACH EXTENDED
- ----------------------------- --- ----- --------
- SPFIND ___ $10.00 $_______
-
-
- For Registered users:
-
- Disk with current version ___ $6.00 $_______
-
-
- Purchase Order (not prepaid) $5.00 $
- -------
-
-
- SUBTOTAL $_______
-
-
- California orders, add sales tax (6%) $
- -------
-
-
- TOTAL $
- -------
-
-
- Name: _________________________________Phone:________________
-
- Address:_____________________________________________________
-
- Address: ____________________________________________________
-
- City, State, Zip: ___________________________________________
-
-
-
- Comments: